How To Unset Or Delete An Element From Array By Value In PHP

121

if (($key = array_search($value, $sampleArray)) !== false) {
    unset($sampleArray[$key]);
}

Comments

Submit
0 Comments